<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <link rel="stylesheet" type="text/css" href="${ctx}/res/css/statistic.css"></link>
	<link rel="stylesheet" type="text/css" href="${ctx}/res/css/question.css"></link> 
	<script type="text/javascript" src="${ctx}/res/js/survey/surveyStatistics/surveyResultStatistics.js"></script>
</head>
<body>
	<div class="container">
		<div class="question-sheet">
			<div class="question-title"><c:out value='${survey.surveyName}'/></div>
		</div>
		<input type="hidden" id="surveyId" value='${survey.id}'/>
		<!-- 根据问卷类型显示不同tab -->
		<div id="tabs" style="border: 1px solid #506AFB" >
			<ul style="background: #506AFB;">
						<li id="tab1" style="background: #f9f9f9;"><a href="#tabs-1">问卷信息</a></li>				
				<% String autho = (String)session.getAttribute("SESSION_AUTHORITY");
				
				
				 if(autho!=null && autho.indexOf("admin")>=0){
				 %>
						<li id="tab2" style="background: #f9f9f9;"><a href="#tabs-2">投票状态</a></li>
						<li id="tab3" style="display: none; background: #f9f9f9;"><a
						href="#tabs-3">综合统计信息</a></li>
						<li id="tab6" style="background: #f9f9f9;"><a href="#tabs-6">投票结果</a></li>					
				<%} %>
			</ul>

			<!-- 问卷信息tab -->
			<div id="tabs-1" style="position: relative;">
				<jsp:include page="surveyResultStatistics_Tab1.jsp"></jsp:include>
			</div>
			<!-- 问卷用户统计 -->
			<div id="tabs-2" style="display: none; height: auto">
				<div class="list_scrollControlDiv" style="width: auto; height: auto;">
				 <jsp:include page="surveyResultStatistics_Tab2.jsp"></jsp:include>
				</div>
			</div>
			<!-- 综合统计信息 -->
			<div id="tabs-3"
				style="text-align: center; margin-left: auto; margin-right: auto;">
			 	<div id="result"
					style="text-align: center; margin-left: auto; margin-right: auto;"></div>
				<div>
					<form
						action="<%=request.getContextPath()%>/survey/surveyStatistics/groupingStatistics/exportController/export.do"
						id="groupStaticsDownload" >
						<%
						 
						 if(autho!=null && autho.indexOf("admin")>=0){
				 		%>
						<div class="toolButton" id="download">导出</div>
						<div class="toolButton" onclick="reBack()" align="center" >返回</div>				
						<%} %>					
						<input type="hidden" value="${survey.id}" name="surveyId">
						<input type="hidden" name="selectedQuestionOrder">
					</form>
				</div>
			</div>

			 

			<!-- 数量统计信息 -->
			<div id="tabs-6" style="position: relative;"></div>
			
			<form id="submitcurrentpage" method="post" action="${ctx}/survey/surveyList/loadSurveyList.do">
				<input type="hidden" name="pageType" value="lastest"/>
				<input type="hidden" name="type" value="${type}"/>
				<input type="hidden" name="currentPage" value="${currentPage}"/>	
			</form>
			<form id="submitcurrentpage1" method="post" action="${ctx}/survey/surveyManagement/surveyList.do">
				<input type="hidden" name="pageType" value="lastest"/>
			</form>
			<form id="queryForm"  method="post"action="${ctx}/survey/surveyStatistics/userAnswerStatus/answerExport.do" >
				<input name="survetyId" type="hidden" value="${survey.id}" /> 
			</form>
			<form id="viewResult" method="post" action="${ctx}/survey/surveyStatistics/surveyResultStatistics/survey.do">
				<input type="hidden" value="${survey.id}"  name="survetyId"/>
			</form>
		</div>
	</div>
</body>
</html>
